<template>
	<div class="news3">
		<div class="news3-item" v-for="i in 2">
			<div class="news3-image">
				<router-link :to="setPath(item.id)">
					<img :src="setImage(item.logo)" />
				</router-link>
			</div>
			<div class="news3-title">
				<router-link :to='setPath(item.id)'>{{item.title}}</router-link>
			</div>
			<div class="news3-about">
				<span class="news3-from">{{item.source}}</span>
				<span class="news3-button">
					<router-link to="setPath(item.id)">[{{category}}]</router-link>
				</span>
			</div>
		</div>
	</div>
</template>

<script>
	import store from '@/store'
	export default {
		name: 'news3',
		props: ['item'],
		data() {
			return {
				category: store.currentMenu.name
			}
		},
		computed: {},
		methods: {
			toList: function() {
				//this.$router.push('/')
				return '/' + store.state.currentMenu.code
			},
			setPath: function(newsId) {
				return store.state.currentMenu.code + '/news' + newsId
			},
			setImage: function(url) {
				return store.state.StaticStore.baseUrl + '/data/' + url
			},
			changeArticle: function(name) {
				store.commit("changeArticle", name)
			}
		}
	}
</script>